import 'package:flutter/material.dart';

class ImageCase extends StatelessWidget {
  const ImageCase({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: Colors.yellow,
      alignment: Alignment.center,
      child: SizedBox(
        width: 300,
        height: 300,
        child: Image.network(
          "https://img0.baidu.com/it/u=794816915,1474278636&fm=253&fmt=auto&app=120&f=JPEG?w=508&h=500",
          width: double.infinity,
          height: double.infinity,
          fit: BoxFit.cover,
        ),
      ),
      // SizeBox 就是一个盒子 可以设置宽度高度
    );
  }
}
